package com.wtb.javatool.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;

/**
 * 项目表
 * @author sakura
 *
 */
@Data
@ToString
public class Project {
    private int projectId;
    private String projectName;
    private String projectDesc;
    private Date startTime;
    private Date endTime;
    private int statusId;
    private int bandId;
    private int typeId;
    private String gitAddress;
    private String projectAddress;
    private int stars;
    private int phone;
    private int isPublic;
    private String masterName;
    private String studentsNames;
    private ArrayList<String> studentsNameArr;
    private int masterId;
    private String tagNames;
    private ArrayList<String> tagNameArr;

    public void studentsNameArr(String studentsName){
        ArrayList<String> studentsNameArr = new ArrayList<String>();
        String[] strings = studentsName.split(";");
        Collections.addAll(studentsNameArr, strings);
        this.studentsNameArr = studentsNameArr;
    }
    public void tagNameArr(String tagNames){
        ArrayList<String> tagNameArr = new ArrayList<String>();
        String[] strings = tagNames.split(";");
        Collections.addAll(tagNameArr, strings);
        this.tagNameArr = tagNameArr;
    }
}
